<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://technoplaza.suso.org/assembly/index.cgi?p=68ks1 -->
<HTML><HEAD><TITLE>Effective Addressing</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<link href="edit68k.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgColor=#ffffff>
<H1 class="heading">Registers<br>
    <hr noshade>
</H1>
<span class="text">The 68000 has 16 register, 8 data registers (D0-D7) and 8 address registers (A0-A7) and they are all longword, i.e. 32 bit. No data or address register is different from any other. That means whenever you can use D0, you can always use D1-D7 also, the D0 register isn't a "main register", as the A register is on a Z80, or the registers on a x86 where all registers are made for different purposes (AX - accumulator, CX - counter, SI, DI - pointers etc). The only real difference between the registers is data registers vs. the address registers.<BR>
        <BR>
One important thing is that if you have a longword stored in a data register and you move a byte into it, the most significant three bytes are still there! This may cause problems when you later add or multiply the register, you MUST clear the most significant part!<BR>
        <BR>
The 68k also has a PC, Program Counter, as do most CPUs. Works the same way too (it is a 24 bit register). The stack pointer is actually the A7 register, so maybe you should say that A7 works differently compared to A0-A6, but it doesn't really. You could use A6 as stack pointer, except that all ROM routines and the CPU itself ( see bsr and jsr ) use A7 as the SP so it wouldn't be a good idea.</span>
<H4 align=left>&nbsp;</H4>
</BODY></HTML>
